/*
 * @(#)ResnikSegmenter.java	0.1 10/01/07
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */

package org.tabularium.text.nlp;

import org.tabularium.text.nlp.wordnet.WordNet;

/**
 * A text segmentation algorithm based on Resnik similarity/disambiguation
 * algorithms
 * 
 * @TODO to be implemented.
 * 
 * @author Fabio Gasparetti
 * @version 0.1, 10/01/07
 */
public class ResnikSegmenter extends Segmenter {
	@Override
	public int[] segment(String[] sentences) {
		// TODO Auto-generated method stub
		return null;
	}

	TextTagger tagger = null;

	WordNet wordNet = null;

	CollectionFrequency frequencies = null;

	Collocations collocations = null;

	Resnik resnik = null;
	
	Disambiguation disambiguation = null;

	public ResnikSegmenter(TextTagger t, WordNet wn, Stemmer stem,
			CollectionFrequency cf, Collocations c, Disambiguation d) {
		this (t, wn, stem, cf, c, new Resnik(wn, stem, cf), d);
	}

	public ResnikSegmenter(TextTagger t, WordNet wn, Stemmer stem,
			CollectionFrequency cf, Collocations c, Resnik r, Disambiguation d) {
		tagger = t;
		wordNet = wn;
		frequencies = cf;
		collocations = c;
		resnik = r;
		disambiguation = d;
	}

	/**
	 * 
	 */
	public void init() {
		//resnik.init();
	}

	public String[] segment(String text) {
		double sim = 0d;
		Tag[] tags = null;
		try {
			tags = tagger.tag(text);
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
		// TODO
		return null;
	}

	public int[] segment(Tag[] tags) {
		// TODO Auto-generated method stub
		return null;
	}

}
